<template>
  <div>
    <live v-if="type == 1"></live>
    <bunch-planting v-else-if="type == 2"></bunch-planting>
    <im v-else-if="type == 3"></im>
    
    <!-- <app-security v-else-if="type == 2"></app-security>
    <vulnerability v-else-if="type == 3"></vulnerability>
    <network-intrusion v-else-if="type == 4"></network-intrusion> -->
    
  </div>
</template>

<script>
import live from './live.vue'
import bunchPlanting from './bunchPlanting.vue'
import Im from './im.vue'

export default {
  data () {
    return {
        type: 1
    };
  },

  components: {
    live,
    bunchPlanting,
    Im
  },
  props: {},
  mounted() {
    let type = this.$route.query.type;
    this.type = type || 1;
  },
  computed: {},
  watch: {
    '$route': {
      handler: function (n, o) {
        let type = n.query.type
        this.type = type || 1
      },
      deep: true,
    },
  },
  methods: {},
  destroyed(){},
}

</script>
<style lang='scss' scoped>
</style>